package com.shitou.util;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.SimpleTagSupport;

public class IssuesStateSpanTag extends SimpleTagSupport{

	private Integer state;

	@Override
	public void doTag() throws JspException, IOException {
		JspWriter out = getJspContext().getOut();
		if(AssignmentUtil.UNASSIGNED == state) {
			out.print("<span style=\"color:#77BACE\">未处理</span>");
		} else if(AssignmentUtil.SOLVING == state) {
			out.print("<span style=\"color:#77BACE\">解决中</span>");
		} else if(AssignmentUtil.SUSPEND == state) {
			out.print("<span style=\"color:#77BACE\">暂停解决</span>");
		} else if(AssignmentUtil.SLOVED == state) {
			out.print("<span style=\"color:#77BACE\">已解决</span>");
		} else if(AssignmentUtil.CLOSED == state) {
			out.print("<span style=\"color:#77BACE\">已关闭</span>");
		} else if(AssignmentUtil.REOPEN == state) {
			out.print("<span style=\"color:#77BACE\">重新开放</span>");
		}
	}
	
	//getter and setter
	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}
	
	
}
